package drds.global_transaction;

import drds.common.Author;

@Author(name = Authors.LI_YANG)
public class GlobalTransactionContext
{
    //全局事务整体的运行的状态
    public static String service_status_initting = "initting";
    /**
     * 分布式全局服务是否正在服务,
     */
    public static String service_status = GlobalTransactionContext.service_status_initting;
    public static String service_status_running = "running";
    public static String service_status_stopping = "stopping";
    public static String service_status_stopped = "stopped";


    public static boolean isInitting()
    {
        return service_status.equals(service_status_initting);
    }

    public static boolean isRunning()
    {
        return service_status.equals(service_status_running);
    }

    public static boolean isStopping()
    {
        return service_status.equals(service_status_stopping);
    }

    public static boolean isStopped()
    {
        return service_status.equals(service_status_stopped);
    }
}
